@undefineds.co/xpod 0.4.25 → 0.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/api/ApiServer.d.ts +1 -0
  2. package/dist/api/ApiServer.js +38 -0
  3. package/dist/api/ai-config/AiConfigStore.js +18 -6
  4. package/dist/api/ai-gateway/connect/index.d.ts +1 -0
  5. package/dist/api/ai-gateway/connect/index.js +39 -18
  6. package/dist/api/ai-gateway/models/ProviderModelsAdapter.js +5 -2
  7. package/dist/api/container/common.js +8 -2
  8. package/dist/api/container/index.js +2 -2
  9. package/dist/api/container/local.js +6 -3
  10. package/dist/api/handlers/AiGatewayHandler.d.ts +1 -0
  11. package/dist/api/handlers/AiGatewayHandler.js +53 -3
  12. package/dist/api/handlers/AiGatewayManagementHandler.js +9 -0
  13. package/dist/api/handlers/TaskHandler.js +15 -10
  14. package/dist/api/network/NetworkEnvironmentConfigurationStore.js +1 -1
  15. package/dist/api/runs/ManagedRunWorker.d.ts +0 -1
  16. package/dist/api/runs/ManagedRunWorker.js +2 -14
  17. package/dist/api/runs/PiAgentRuntimeDriver.d.ts +0 -8
  18. package/dist/api/runs/PiAgentRuntimeDriver.js +65 -21
  19. package/dist/api/runs/RunStateCenter.js +1 -0
  20. package/dist/api/runs/store.d.ts +1 -0
  21. package/dist/api/runs/store.js +13 -0
  22. package/dist/api/tasks/TaskMaterializer.js +13 -6
  23. package/dist/api/tasks/TaskResumeDiagnostics.d.ts +28 -0
  24. package/dist/api/tasks/TaskResumeDiagnostics.js +148 -0
  25. package/dist/api/tasks/TaskService.js +40 -23
  26. package/dist/storage/conditions/StorageETagHandler.d.ts +1 -1
  27. package/dist/storage/conditions/StorageETagHandler.js +13 -4
  28. package/dist/util/task-model-diagnostics.d.ts +67 -0
  29. package/dist/util/task-model-diagnostics.js +118 -0
  30. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -0
  31. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +2 -1
  32. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -0
  33. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -0
  34. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.js +10 -10
  35. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +3 -1
  36. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.js +2 -2
  37. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +77 -23
  38. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -0
  39. package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.js +59 -59
  40. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +2 -0
  41. package/node_modules/@undefineds.co/ai-connections/dist/collections.js +14 -6
  42. package/node_modules/@undefineds.co/ai-connections/dist/contract/ai-connections-client.d.ts +2 -1
  43. package/node_modules/@undefineds.co/ai-connections/dist/contract/ai-connections-client.js +1 -0
  44. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/gateway-model-roles.d.ts +11 -0
  45. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/gateway-model-roles.js +11 -0
  46. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/normalize.d.ts +2 -1
  47. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/normalize.js +12 -5
  48. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/request.js +10 -2
  49. package/node_modules/@undefineds.co/ai-connections/dist/contract/client/types.d.ts +10 -0
  50. package/node_modules/@undefineds.co/ai-connections/package.json +1 -1
  51. package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +1 -0
  52. package/node_modules/@undefineds.co/extension-sdk/package.json +1 -1
  53. package/node_modules/@undefineds.co/pod-collections/dist/index.cjs +60 -13
  54. package/node_modules/@undefineds.co/pod-collections/dist/mapping.d.ts +16 -1
  55. package/node_modules/@undefineds.co/pod-collections/dist/mapping.js +51 -0
  56. package/node_modules/@undefineds.co/pod-collections/dist/mutations.js +14 -18
  57. package/node_modules/@undefineds.co/pod-collections/package.json +1 -1
  58. package/node_modules/@undefineds.co/shared-ui/dist/list.d.ts +8 -1
  59. package/node_modules/@undefineds.co/shared-ui/dist/list.js +4 -1
  60. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/IdpChrome.d.ts +1 -1
  61. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/IdpChrome.js +2 -2
  62. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/IdpViews.js +2 -2
  63. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/PodSignInFrame.d.ts +3 -3
  64. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/PodSignInFrame.js +5 -5
  65. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/parts.d.ts +5 -5
  66. package/node_modules/@undefineds.co/shared-ui/dist/pod-sign-in/parts.js +5 -5
  67. package/node_modules/@undefineds.co/shared-ui/dist/section-header.js +1 -1
  68. package/node_modules/@undefineds.co/shared-ui/dist/theme.css +5 -32
  69. package/node_modules/@undefineds.co/shared-ui/package.json +1 -1
  70. package/node_modules/@undefineds.co/solid-sdk/package.json +1 -1
  71. package/package.json +2 -2
  72. package/static/app/assets/main.css +1 -1
  73. package/static/app/assets/main.js +1 -1
  74. package/static/dashboard/assets/AccountAuthBoundary-Dv52SZc6.js +1 -0
  75. package/static/dashboard/assets/DesktopOidcCallback-DaT_Rumf.js +1 -0
  76. package/static/dashboard/assets/DevicePages-HjclpIVm.js +2 -0
  77. package/static/dashboard/assets/ModelsPage-Be2TPd-x.js +11 -0
  78. package/static/dashboard/assets/{PaneListHeader-Dn5O0mwy.js → PaneListHeader-DtvnRmFq.js} +1 -1
  79. package/static/dashboard/assets/{PodDeletionAuthorizationPanel-D3NOG6ZM.js → PodDeletionAuthorizationPanel-BJk_8rJq.js} +3 -3
  80. package/static/dashboard/assets/PodPage-C4gzEspV.js +1 -0
  81. package/static/dashboard/assets/{SystemSettingsPage-BNQP_Yuc.js → SystemSettingsPage-HaNrP1H1.js} +1 -1
  82. package/static/dashboard/assets/TasksPage-BdO5K2L7.js +1 -0
  83. package/static/dashboard/assets/{WebDesktopEntry-vnb4CZWp.js → WebDesktopEntry-Cj9_ZfJU.js} +1 -1
  84. package/static/dashboard/assets/XpodAiConnectionsPodStore-B7gmXBmC.js +3 -0
  85. package/static/dashboard/assets/XpodShellApp-D_KY4nCW.js +4 -0
  86. package/static/dashboard/assets/{account-session-DCUmCop1.js → account-session-DlcKNG7k.js} +1 -1
  87. package/static/dashboard/assets/{button-By5Bgvmb.js → button-wslF55uZ.js} +1 -1
  88. package/static/dashboard/assets/collection-runtime-uxxgEu13.js +1 -0
  89. package/static/dashboard/assets/{createLucideIcon-bunMzPms.js → createLucideIcon-BJQl82Qk.js} +1 -1
  90. package/static/dashboard/assets/dashboard-CbJ-JkrI.css +1 -0
  91. package/static/dashboard/assets/{dashboard-mlsg3yaw.js → dashboard-Or0gnkou.js} +2 -2
  92. package/static/dashboard/assets/index-BqFeOML9.js +1 -0
  93. package/static/dashboard/assets/{index-DvMG5pHk.js → index-DgKn1twH.js} +2 -2
  94. package/static/dashboard/assets/{label-Bj03L9xs.js → label-CS6Sx6Zb.js} +1 -1
  95. package/static/dashboard/assets/list-UyhlCFKk.js +1 -0
  96. package/static/dashboard/assets/{nav-item-style-BNqWQY6p.js → nav-item-style-CW1Nnorq.js} +1 -1
  97. package/static/dashboard/assets/{pod-collections-host-KnnGFZHL.js → pod-collections-host-DjK2xf-b.js} +6 -6
  98. package/static/dashboard/assets/{safe-continuation-D9AhcWiB.js → safe-continuation-ClWAhcma.js} +1 -1
  99. package/static/dashboard/assets/{section-header-CLCzbOp_.js → section-header-CEIEcco-.js} +1 -1
  100. package/static/dashboard/assets/{setting-row-DTCec8A2.js → setting-row-CaYv3dfF.js} +1 -1
  101. package/static/dashboard/assets/xpod-remembered-login-BUF9fin1.js +310 -0
  102. package/static/dashboard/dashboard.html +2 -2
  103. package/static/settings/assets/{AccountAuthBoundary-C0og_gIA.js → AccountAuthBoundary-Chqd38oU.js} +1 -1
  104. package/static/settings/assets/{DesktopOidcCallback-C5q4oFZ0.js → DesktopOidcCallback-VUrOSM_q.js} +1 -1
  105. package/static/settings/assets/DevicePages-C6qwvWwu.js +2 -0
  106. package/static/settings/assets/ModelsPage-Ry_dObRQ.js +11 -0
  107. package/static/settings/assets/{PaneListHeader-DqVlMe2D.js → PaneListHeader-B5RkRqr4.js} +1 -1
  108. package/static/settings/assets/{PodDeletionAuthorizationPanel-DgVvarVY.js → PodDeletionAuthorizationPanel-DPM-5Izt.js} +3 -3
  109. package/static/settings/assets/PodPage-CxND6wwc.js +1 -0
  110. package/static/settings/assets/{SystemSettingsPage-Crzm_DrI.js → SystemSettingsPage-C8EdMkW7.js} +1 -1
  111. package/static/settings/assets/TasksPage-DuqptEm8.js +1 -0
  112. package/static/settings/assets/{WebDesktopEntry-BGC5eRF2.js → WebDesktopEntry-BRcyktkv.js} +1 -1
  113. package/static/settings/assets/XpodAiConnectionsPodStore-CyA_BJVC.js +3 -0
  114. package/static/settings/assets/XpodShellApp-CsivHJl0.js +4 -0
  115. package/static/settings/assets/XpodThemeProvider-CbJ-JkrI.css +1 -0
  116. package/static/settings/assets/{XpodThemeProvider-CB6LepTA.js → XpodThemeProvider-DK3pIdRG.js} +2 -2
  117. package/static/settings/assets/{account-session-BcLjCj0x.js → account-session-DJOZ03xr.js} +1 -1
  118. package/static/settings/assets/auth-callback-GIBYEz_7.js +1 -0
  119. package/static/settings/assets/{button-BObT8pTE.js → button-D3yW-2o1.js} +1 -1
  120. package/static/settings/assets/collection-runtime-DfGo25mh.js +1 -0
  121. package/static/settings/assets/{createLucideIcon-BVsUxXpZ.js → createLucideIcon-CacwLsmB.js} +1 -1
  122. package/static/settings/assets/{index-ktjMkj7-.js → index-r5KRYsKC.js} +1 -1
  123. package/static/settings/assets/{label-BrqO8_m_.js → label-MJjUmvzG.js} +1 -1
  124. package/static/settings/assets/list-Ce-5k1MX.js +1 -0
  125. package/static/settings/assets/{nav-item-style-Di2CxkDU.js → nav-item-style-ZUbL8KOZ.js} +1 -1
  126. package/static/settings/assets/{pod-collections-host-KnnGFZHL.js → pod-collections-host-DjK2xf-b.js} +6 -6
  127. package/static/settings/assets/{safe-continuation-Dx6ceJpY.js → safe-continuation-vlBZFSlU.js} +1 -1
  128. package/static/settings/assets/{section-header-Dtl7yjVr.js → section-header-DGJdEvQw.js} +1 -1
  129. package/static/settings/assets/{setting-row-BL6Hhe8N.js → setting-row-C7tuFiho.js} +1 -1
  130. package/static/settings/assets/{settings-DaRBxoZk.js → settings-CyQPih1O.js} +1 -1
  131. package/static/settings/assets/xpod-remembered-login-D-TzzT5K.js +567 -0
  132. package/static/settings/auth-callback.html +3 -3
  133. package/static/settings/settings.html +3 -3
  134. package/static/dashboard/assets/AccountAuthBoundary-BvoDydRz.js +0 -1
  135. package/static/dashboard/assets/DesktopOidcCallback-BwIj874x.js +0 -1
  136. package/static/dashboard/assets/DevicePages-jOjMcvsr.js +0 -2
  137. package/static/dashboard/assets/ModelsPage-CMTdfqBR.js +0 -11
  138. package/static/dashboard/assets/PodPage-BueBdJ9_.js +0 -1
  139. package/static/dashboard/assets/TasksPage-CxtLJiSF.js +0 -1
  140. package/static/dashboard/assets/XpodAiConnectionsPodStore-wx3Ttupm.js +0 -18
  141. package/static/dashboard/assets/XpodShellApp-5FWY8-d5.js +0 -4
  142. package/static/dashboard/assets/collection-runtime-BnomuB0E.js +0 -1
  143. package/static/dashboard/assets/dashboard-C64R553B.css +0 -1
  144. package/static/dashboard/assets/xpod-remembered-login-Dr69A0Rv.js +0 -295
  145. package/static/settings/assets/DevicePages-fyHjjucT.js +0 -2
  146. package/static/settings/assets/ModelsPage-EyOByLyE.js +0 -11
  147. package/static/settings/assets/PodPage-DY4Oi9wg.js +0 -1
  148. package/static/settings/assets/TasksPage-CfXJbnlt.js +0 -1
  149. package/static/settings/assets/XpodAiConnectionsPodStore-CXcmgKmQ.js +0 -3
  150. package/static/settings/assets/XpodShellApp-D1PS3Iut.js +0 -4
  151. package/static/settings/assets/XpodThemeProvider-C64R553B.css +0 -1
  152. package/static/settings/assets/auth-callback-DSPQ28ar.js +0 -1
  153. package/static/settings/assets/collection-runtime-DzNbdZGe.js +0 -1
  154. package/static/settings/assets/index-browser-3WfrNbcG.js +0 -273
  155. package/static/settings/assets/xpod-remembered-login-Q66DH12t.js +0 -295
@@ -1,2 +0,0 @@
1
- import{r as o,j as e,d as Re,N as Pe}from"./XpodThemeProvider-CB6LepTA.js";import{T as Te,u as Le,h as Ae,b as Ee,c as $e,d as Me,f as Ie,e as _e,t as Oe}from"./nav-item-style-Di2CxkDU.js";import{P as qe}from"./PaneListHeader-DqVlMe2D.js";import{c as C}from"./createLucideIcon-BVsUxXpZ.js";import{t as H,m as le,R as ze,g as ne,S as Ue}from"./XpodShellApp-D1PS3Iut.js";import{c as be,S as He,B as y}from"./button-BObT8pTE.js";import{f as P,C as T,b as L,d as A,e as E}from"./PodDeletionAuthorizationPanel-DgVvarVY.js";import{B as q,S as xe}from"./section-header-Dtl7yjVr.js";import{a as he}from"./setting-row-BL6Hhe8N.js";import"./xpod-remembered-login-Q66DH12t.js";import"./account-session-BcLjCj0x.js";import"./safe-continuation-Dx6ceJpY.js";const ee=o.forwardRef(({className:a,...s},t)=>e.jsx("div",{ref:t,className:be("divide-y rounded-xl border border-border bg-card",a),...s}));ee.displayName="ListSurface";const ie=o.forwardRef(({className:a,leading:s,title:t,description:i,trailing:n,asChild:c=!1,children:r,...x},f)=>{const d=be("flex flex-wrap items-center gap-3 p-4 text-sm leading-normal",a),m=c?He:"div";return e.jsx(m,{ref:f,className:d,...x,children:c?r:e.jsxs(e.Fragment,{children:[s?e.jsx("span",{className:"shrink-0",children:s}):null,e.jsxs("div",{className:"min-w-0 flex-1 break-words",children:[t?e.jsx("div",{children:t}):null,i?e.jsx("p",{className:"mt-0.5 text-xs leading-normal text-muted-foreground",children:i}):null]}),n?e.jsx("span",{className:"shrink-0",children:n}):null,r?e.jsx("div",{className:"w-full min-w-0 break-words",children:r}):null]})})});ie.displayName="ListRow";const Ve=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],ye=C("activity",Ve);const Be=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],Fe=C("cable",Be);const Xe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ke=C("download",Xe);const We=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],we=C("earth",We);const Ge=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ne=C("external-link",Ge);const Je=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Qe=C("lock-keyhole",Je);const Ye=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],ke=C("network",Ye);const Ze=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ea=C("radio",Ze);const aa=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],sa=C("rotate-ccw",aa);const ta=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],na=C("route",ta);const ia=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ra=C("shield-check",ia);const la=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],oa=C("waypoints",la);const da=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],ca=C("wifi",da);async function ua({fetchImpl:a}){return F(a,B("/api/network/settings/status"),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function ma({fetchImpl:a}){return F(a,B("/api/network/settings/diagnose"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function Ce({fetchImpl:a}){return F(a,B("/api/network/settings/tunnel-clients"),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function xa({fetchImpl:a,provider:s}){return F(a,B(`/api/network/settings/tunnel-clients/${encodeURIComponent(s)}/install`),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function ha({fetchImpl:a}){await F(a,B("/api/network/settings/certificate/renew"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function pa({podUrl:a,fetchImpl:s,patch:t}){return F(s,ga("/api/network/settings/configuration",a),{method:"PUT",credentials:"include",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(t)})}function B(a){const s=typeof window>"u"?"http://localhost":window.location.origin;return new URL(a,s).toString()}function ga(a,s){return s?new URL(a,s).toString():B(a)}async function F(a,s,t){const i=await a(s,t);if(!i.ok)throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");if(!i.headers.get("content-type")?.includes("application/json"))throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");return await i.json()}const re=[{id:"overview",label:"Overview",path:"",icon:ke},{id:"endpoints",label:"Endpoints",path:"endpoints",icon:Fe},{id:"addresses",label:"Addresses",path:"addresses",icon:we},{id:"domain-dns",label:"Domain & DNS",path:"domain-dns",icon:na},{id:"https",label:"HTTPS",path:"https",icon:Qe},{id:"tunnel-profiles",label:"Tunnel Profiles",path:"tunnel-profiles",icon:oa},{id:"p2p",label:"P2P",path:"p2p",icon:ea},{id:"diagnostics",label:"Diagnostics",path:"diagnostics",icon:ye}];function fa(a){const s=["Xpod Network Diagnostics",`Generated: ${a.generatedAt}`,`Canonical URL: ${a.endpoint??"Unavailable"}`],t=a.checks.flatMap(i=>["",`[${i.status.toUpperCase()}] ${i.label}`,...i.detail?[i.detail]:[]]);return[...s,...t].join(`
2
- `)}function va({embedded:a=!1}){const s=Re(),[t,i]=o.useState(),[n,c]=o.useState([]),[r,x]=o.useState(),[f,d]=o.useState(),[m,v]=o.useState(!1),[b,$]=o.useState(!1),[h,N]=o.useState(!1),[u,l]=o.useState(!1),[p,D]=o.useState(),R=o.useRef(0),X=o.useRef(0),K=o.useRef(0),W=o.useRef(void 0),G=o.useRef(!0),J=typeof window>"u"?void 0:window.location.origin,M=J?`local-host:${J}`:void 0,_=globalThis.fetch;o.useEffect(()=>(G.current=!0,()=>{G.current=!1,R.current+=1,X.current+=1,K.current+=1}),[]);const Q=o.useCallback((g,j)=>G.current&&R.current===g&&W.current===j,[]),Y=o.useCallback((g,j)=>G.current&&X.current===g&&W.current===j,[]),Z=o.useCallback((g,j)=>G.current&&K.current===g&&W.current===j,[]),z=o.useCallback(async()=>{const g=M;if(!g)return;const j=R.current+1;R.current=j,v(!0),d(void 0);try{const I=await ua({fetchImpl:_});Q(j,g)&&i(I)}catch{Q(j,g)&&d("网络设置请求失败,请重试。")}finally{Q(j,g)&&v(!1)}},[_,M,Q]);o.useEffect(()=>{let g=!1;return W.current=M,R.current+=1,X.current+=1,K.current+=1,queueMicrotask(()=>{g||W.current!==M||(i(void 0),c([]),x(void 0),d(void 0),v(!1),$(!1),N(!1),M&&z())}),()=>{g=!0}},[M,z]);const de=o.useCallback(async()=>{const g=M;if(!g)return;const j=X.current+1;X.current=j,$(!0),d(void 0);try{const I=await ma({fetchImpl:_});Y(j,g)&&(c(I.checks),x(new Date),H({description:"诊断完成"}))}catch{Y(j,g)&&d("网络诊断失败,请重试。")}finally{Y(j,g)&&$(!1)}},[_,M,Y]),ce=o.useCallback(async()=>{const g=M;if(!g)return;const j=K.current+1;K.current=j,N(!0),d(void 0);try{await ha({fetchImpl:_}),Z(j,g)&&(H({variant:"success",description:"证书续签成功"}),await z())}catch{Z(j,g)&&d("证书续签失败,请重试。")}finally{Z(j,g)&&N(!1)}},[_,M,Z,z]),O=o.useCallback(async g=>{if(J){l(!0),d(void 0);try{const j=await pa({fetchImpl:_,patch:g});i(I=>I&&{...I,configuration:j.configuration}),D(j.applyState),H({variant:"success",description:"Network configuration saved"})}catch{d("网络配置保存失败,请重试。")}finally{l(!1)}}},[_,J]),ue=o.useMemo(()=>[{key:"local",title:"本机",values:t?.addresses.local??[]},{key:"lan",title:"局域网",values:t?.addresses.lan??[]},{key:"public",title:"公网",values:t?.addresses.public??[]}],[t]),me=s.pathname.split("/").filter(Boolean).at(-1),k=re.some(g=>g.path===me)?me:"overview";return a?e.jsxs("section",{className:"space-y-5 p-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("p",{className:"text-sm leading-normal text-muted-foreground",children:"这台设备上的所有 Pod 共用"}),e.jsx(y,{variant:"outline",size:"sm",disabled:m,onClick:z,children:"刷新"})]}),f&&e.jsx("p",{role:"alert",className:"text-sm leading-normal text-destructive",children:f}),e.jsx("div",{className:"divide-y rounded-xl border border-border bg-card",children:ue.map(({key:g,values:j})=>e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 p-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm leading-normal font-medium",children:g==="local"?"这台电脑":g==="lan"?"局域网":"其他网络"}),e.jsx("div",{className:"mt-1 break-all text-xs leading-normal text-muted-foreground",children:j.join(" · ")||"暂无地址"})]}),e.jsx("span",{className:"text-xs leading-normal text-muted-foreground",children:g==="local"&&t&&["localhost","127.0.0.1","[::1]"].includes(window.location.hostname)?"可访问":g==="public"&&n.some(I=>I.id==="endpoint-reachability"&&I.status==="ok")?"本机检测通过":j.length?"待检测":"未配置"})]},g))}),e.jsx(fe,{configuration:t?.configuration,providers:t?.providers??[],ingress:t?.ingress,saving:u,applyState:p,onSave:O}),e.jsx(je,{status:t,endpoint:t?.endpoint,diagnostics:n,diagnosing:b,renewing:h,onDiagnose:de,onRenewCertificate:ce}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-sm leading-normal text-muted-foreground",children:"开发者模式:网络配置"}),e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsx(pe,{configuration:t?.configuration,saving:u,applyState:p,onSave:O}),e.jsx(ge,{configuration:t?.configuration,saving:u,applyState:p,onSave:O}),e.jsx(ve,{configuration:t?.configuration,saving:u,applyState:p,onSave:O})]})]})]}):e.jsx(Te,{mode:"auto",listHeader:e.jsx(qe,{title:"Network"}),list:e.jsx(ja,{}),mainHeader:e.jsx(ba,{title:re.find(g=>(g.path||"overview")===k)?.label??"Overview",loading:m,stale:m&&!!t,onRefresh:z}),main:e.jsxs("section",{className:"flex min-h-full flex-col gap-4 bg-background p-6",children:[f?e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm leading-normal text-destructive",children:f}):null,(k==="overview"||k==="endpoints")&&e.jsx(Ca,{endpoint:t?.endpoint,loading:m&&!t}),k==="overview"&&e.jsx(ya,{status:t}),(k==="overview"||k==="addresses")&&e.jsx(Da,{sections:ue,loading:m&&!t,diagnostics:n,checkedAt:r}),k==="overview"&&e.jsx(Aa,{status:t}),k==="domain-dns"&&e.jsxs(e.Fragment,{children:[e.jsx(Ta,{status:t}),e.jsx(pe,{configuration:t?.configuration,saving:u,applyState:p,onSave:O})]}),k==="https"&&e.jsxs(e.Fragment,{children:[e.jsx(La,{status:t}),e.jsx(ge,{configuration:t?.configuration,saving:u,applyState:p,onSave:O})]}),k==="tunnel-profiles"&&e.jsxs(e.Fragment,{children:[e.jsx(wa,{title:"Observed tunnel",label:"Tunnel",capability:t?.tunnel}),e.jsx(fe,{configuration:t?.configuration,providers:t?.providers??[],ingress:t?.ingress,saving:u,applyState:p,onSave:O}),e.jsx(Na,{fetchImpl:_})]}),k==="p2p"&&e.jsx(ve,{configuration:t?.configuration,saving:u,applyState:p,onSave:O}),(k==="overview"||k==="diagnostics"||k==="https")&&e.jsx(je,{status:t,endpoint:t?.endpoint,diagnostics:n,diagnosing:b,renewing:h,onDiagnose:de,onRenewCertificate:ce})]}),className:"min-h-full"})}function ja(){const a=Le();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Network sections","data-list-navigation":!0,children:re.map(s=>{const t=s.icon,i=`/network${s.path?`/${s.path}`:""}`;return e.jsxs(Pe,{to:i,onClick:()=>a.openMain(),onKeyDown:Ae,className:({isActive:n})=>Ee(n,{compact:!1}),end:s.path==="",children:[e.jsx(t,{className:"h-4 w-4","aria-hidden":"true"}),s.label]},s.id)})})})}function ba({title:a,loading:s,stale:t,onRefresh:i}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h1",{className:"text-sm leading-normal font-semibold text-foreground",children:["Network · ",a]}),e.jsx("div",{className:"truncate text-xs leading-normal text-muted-foreground","aria-live":"polite",children:t?"Refreshing · showing previous snapshot":"接入点、DNS、TLS、隧道与连通性诊断"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:i,disabled:s,children:[e.jsx(ze,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"刷新"]})})]})}function ya({status:a}){const s=a?.addresses.public[0]??a?.addresses.lan[0]??a?.addresses.local[0]??a?.endpoint,t=a?!a.dns.supported||a.dns.status==="unsupported"?"Configure Domain & DNS, then recheck observed DNS.":!a.tls.supported||!["valid","active","ready"].includes(a.tls.status)?"Review HTTPS configuration and certificate renewal evidence.":"No connectivity action is currently required.":"Refresh network status.",i=a?.tunnel.supported===!0;return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:"Preferred access path"}),e.jsx(A,{className:"leading-normal",children:"First address this runtime has configured, in public → LAN → local order"})]}),e.jsxs(E,{className:"space-y-3 text-sm leading-normal",children:[e.jsx("div",{className:"break-words font-medium",children:s??"Not configured"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-4",children:[e.jsxs(q,{variant:"outline",children:["Local ",a?.addresses.local.length?"configured":"not configured"]}),e.jsxs(q,{variant:"outline",children:["LAN ",a?.addresses.lan.length?"configured":"not configured"]}),e.jsxs(q,{variant:"outline",children:["Public ",a?.addresses.public.length?"configured":"not configured"]}),e.jsxs(q,{variant:"outline",children:["Tunnel ",i?a?.tunnel.status??"unknown":"not observed"]})]}),e.jsx("div",{className:"mt-1 text-xs leading-normal text-muted-foreground",children:"Configured addresses are not probe results; reachability is reported per route."}),e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsx("div",{className:"font-medium",children:"Next action"}),e.jsx("div",{className:"mt-1 text-muted-foreground",children:t})]})]})]})}function wa({title:a,label:s,capability:t,extra:i}){return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:a}),e.jsx(A,{className:"leading-normal",children:"Observed runtime state"})]}),e.jsx(E,{children:e.jsx(V,{label:s,capability:t,extra:i})})]})}function ae({title:a}){return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:a}),e.jsx(A,{className:"leading-normal",children:"设备配置"})]}),e.jsxs(E,{className:"text-sm leading-normal text-muted-foreground",children:["这台设备暂未提供",a,"配置。"]})]})}function pe({configuration:a,saving:s,applyState:t,onSave:i}){const[n,c]=o.useState(a?.domainDns),[r,x]=o.useState("");return o.useEffect(()=>{let f=!1;return queueMicrotask(()=>{f||c(a?.domainDns)}),()=>{f=!0}},[a]),n?e.jsxs(se,{title:"Saved configuration",applyState:t,children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(S,{name:"domain",label:"Domain",value:n.domain,onChange:f=>c({...n,domain:f})}),e.jsx(S,{name:"provider",label:"DNS provider",value:n.provider,onChange:f=>c({...n,provider:f})}),e.jsx(Se,{name:"recordTtl",label:"Record TTL (seconds)",value:n.recordTtl,min:30,max:86400,onChange:f=>c({...n,recordTtl:f})}),e.jsx(S,{name:"dnsCredential",label:n.credentialConfigured?"更换凭据(已配置)":"凭据",value:r,type:"password",onChange:x})]}),e.jsx(oe,{label:"Enable DDNS",checked:n.ddnsEnabled,onChange:f=>c({...n,ddnsEnabled:f})}),e.jsx(te,{label:"Save DNS configuration",saving:s,onClick:()=>i({domainDns:{domain:n.domain,ddnsEnabled:n.ddnsEnabled,provider:n.provider,recordTtl:n.recordTtl,...r?{credential:r}:{}}})})]}):e.jsx(ae,{title:"Domain & DNS"})}function ge({configuration:a,saving:s,applyState:t,onSave:i}){const[n,c]=o.useState(a?.https);return o.useEffect(()=>{let r=!1;return queueMicrotask(()=>{r||c(a?.https)}),()=>{r=!0}},[a]),n?e.jsxs(se,{title:"Saved configuration",applyState:t,children:[e.jsx(oe,{label:"Enable HTTPS",checked:n.enabled,onChange:r=>c({...n,enabled:r})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(S,{name:"acmeEmail",label:"ACME email",value:n.acmeEmail,onChange:r=>c({...n,acmeEmail:r})}),e.jsx(S,{name:"acmeDomains",label:"Certificate domains",value:n.domains.join(", "),onChange:r=>c({...n,domains:r.split(",").map(x=>x.trim()).filter(Boolean)})}),e.jsx(S,{name:"certificatePath",label:"Certificate path",value:n.certificatePath??"",onChange:r=>c({...n,certificatePath:r})}),e.jsx(S,{name:"certificateKeyPath",label:"Private-key path",value:n.certificateKeyPath??"",onChange:r=>c({...n,certificateKeyPath:r})}),e.jsx(Se,{name:"renewBeforeDays",label:"Renew before (days)",value:n.renewBeforeDays,min:1,max:90,onChange:r=>c({...n,renewBeforeDays:r})})]}),e.jsx(te,{label:"Save HTTPS configuration",saving:s,onClick:()=>i({https:n})})]}):e.jsx(ae,{title:"HTTPS"})}function Na({fetchImpl:a}){const[s,t]=o.useState(void 0),[i,n]=o.useState(void 0),[c,r]=o.useState(void 0),x=async()=>{n("inspect"),r(void 0);try{const d=await Ce({fetchImpl:a});t(d.clients)}catch(d){r(d instanceof Error?d.message:String(d))}finally{n(void 0)}},f=async d=>{n(d),r(void 0);try{const m=await xa({fetchImpl:a,provider:d});t(m.clients)}catch(m){r(m instanceof Error?m.message:String(m))}finally{n(void 0)}};return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:"Tunnel clients"}),e.jsx(A,{className:"leading-normal",children:"Clients are not bundled with this build: check where one comes from, or download it into the plugin directory."})]}),e.jsxs(E,{className:"space-y-3 text-sm leading-normal",children:[e.jsx(y,{type:"button",size:"sm",variant:"outline",onClick:x,disabled:i==="inspect",children:i==="inspect"?"Checking…":"Check clients"}),c&&e.jsx("div",{className:"text-destructive",children:c}),s&&e.jsx("div",{className:"space-y-2",children:s.map(d=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-border p-2",children:[e.jsx(q,{variant:d.state==="ready"?"default":"outline",children:d.state==="ready"?"Ready":"Missing"}),e.jsx("span",{className:"font-medium",children:d.label}),e.jsxs("span",{className:"text-xs leading-normal text-muted-foreground",children:[d.path??d.binary,d.version?` · ${d.version}`:"",d.source==="bundled"?" · plugin directory":""]}),d.state==="missing"&&e.jsx("span",{className:"text-xs leading-normal text-muted-foreground",children:d.installHint}),d.state==="missing"&&d.installable&&e.jsx(y,{type:"button",size:"sm",onClick:()=>f(d.provider),disabled:i===d.provider,children:i===d.provider?"Downloading…":"Download"}),d.state==="missing"&&!d.installable&&e.jsxs("span",{className:"text-xs leading-normal text-muted-foreground",children:["(",d.installableReason,")"]})]},d.provider))})]})]})}function fe({configuration:a,providers:s,ingress:t,saving:i,applyState:n,onSave:c}){const[r,x]=o.useState(a?.tunnelProfiles.activeProfileId??""),[f,d]=o.useState(a?.tunnelProfiles.profiles??[]),[m,v]=o.useState({});if(o.useEffect(()=>{let l=!1;return queueMicrotask(()=>{l||(x(a?.tunnelProfiles.activeProfileId??""),d(a?.tunnelProfiles.profiles??[]),v({}))}),()=>{l=!0}},[a]),!a)return e.jsx(ae,{title:"隧道"});const b=(l,p)=>d(D=>D.map(R=>R.id===l?{...R,...p}:R)),$=s.filter(l=>l.runtimeSupported),h=l=>s.find(p=>p.id===l),N=()=>{const l=`tunnel-${Date.now()}`,p=$[0]?.id??"ngrok";d(D=>[...D,{id:l,provider:p,label:"新隧道",credentialConfigured:!1,parameters:{}}])},u=l=>{d(p=>p.filter(D=>D.id!==l)),r===l&&x("none")};return e.jsxs(se,{title:"隧道",applyState:n,children:[e.jsxs("label",{className:"block space-y-2 text-sm leading-normal font-medium",children:["主地址",e.jsxs("select",{value:r||"none",onChange:l=>x(l.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"none",children:"停用"}),f.map(l=>e.jsxs("option",{value:l.id,children:[l.label," · ",l.provider]},l.id))]})]}),e.jsx("div",{className:"space-y-3",children:f.map(l=>e.jsxs("div",{className:"space-y-3 rounded-md border border-border p-3 text-sm leading-normal",children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(S,{name:`tunnel-label-${l.id}`,label:"名称",value:l.label,onChange:p=>b(l.id,{label:p})}),e.jsxs("label",{className:"block space-y-2 text-sm leading-normal font-medium",children:["隧道服务商",e.jsx("select",{value:l.provider,onChange:p=>b(l.id,{provider:p.target.value,parameters:{}}),className:"block h-10 w-full rounded-md border border-input bg-background px-3",children:s.map(p=>e.jsxs("option",{value:p.id,disabled:!p.runtimeSupported,children:[p.label,p.runtimeSupported?"":"(暂不支持)"]},p.id))})]}),h(l.provider)?.endpointSource==="declared"?e.jsx(S,{name:`tunnel-url-${l.id}`,label:"公网地址",value:l.publicUrl??"",onChange:p=>b(l.id,{publicUrl:p})}):e.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:"地址由隧道自动提供。"}),e.jsx(S,{name:`tunnel-credential-${l.id}`,label:l.credentialConfigured?"更换凭据(已配置)":"凭据",type:"password",value:m[l.id]??"",onChange:p=>v(D=>({...D,[l.id]:p}))})]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer font-medium",children:"服务商参数"}),e.jsx("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:(h(l.provider)?.parameterFields??[]).map(({key:p,label:D})=>e.jsx(S,{name:`tunnel-${p}-${l.id}`,label:D,value:l.parameters?.[p]??"",onChange:R=>b(l.id,{parameters:{...l.parameters,[p]:R}})},p))})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-xs leading-normal text-muted-foreground",children:[r===l.id?"重启后启用":"已停用"," · ",l.credentialConfigured?"已配置凭据":"未配置凭据"]}),e.jsx(y,{type:"button",size:"sm",variant:"ghost",onClick:()=>u(l.id),children:"移除"})]})]},l.id))}),e.jsx(y,{type:"button",size:"sm",variant:"outline",onClick:N,children:"添加隧道"}),e.jsx(ka,{ingress:t,descriptor:h(f.find(l=>l.id===r)?.provider??"")}),e.jsx(te,{label:"保存隧道",saving:i,onClick:()=>c({tunnelProfiles:{activeProfileId:r,profiles:f.map(l=>({id:l.id,provider:l.provider,label:l.label,publicUrl:l.publicUrl,parameters:l.parameters,...m[l.id]?{credential:m[l.id]}:{}}))}})})]})}function ka({ingress:a,descriptor:s}){if(!a||s?.originOwner!=="console")return null;const t=async()=>{await window.navigator.clipboard.writeText(a.originUrl),H({description:"Tunnel origin copied"})};return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3","data-testid":"ingress-origin",children:[e.jsx("div",{className:"text-xs leading-normal font-medium text-muted-foreground",children:"把隧道指向此地址"}),e.jsxs("div",{className:"mt-1 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-all font-mono text-sm leading-normal",children:a.originUrl}),e.jsx("div",{className:"mt-1 text-xs leading-normal text-muted-foreground",children:"在服务商控制台填写此地址。"})]}),e.jsxs("div",{className:"flex shrink-0 gap-1",children:[e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":"Copy tunnel origin",onClick:()=>{t()},children:e.jsx(le,{className:"h-4 w-4","aria-hidden":"true"})}),s.consoleUrl?e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":`Open ${s.label} console`,onClick:()=>window.open(s.consoleUrl,"_blank","noopener,noreferrer"),children:e.jsx(Ne,{className:"h-4 w-4","aria-hidden":"true"})}):null]})]})]})}function ve({configuration:a,saving:s,applyState:t,onSave:i}){const[n,c]=o.useState(a?.p2p);return o.useEffect(()=>{let r=!1;return queueMicrotask(()=>{r||c(a?.p2p)}),()=>{r=!0}},[a]),n?e.jsxs(se,{title:"Saved P2P configuration",applyState:t,children:[e.jsx(oe,{label:"Enable P2P fallback",checked:n.enabled,onChange:r=>c({...n,enabled:r})}),e.jsx(S,{name:"signalService",label:"Signal service",value:n.signalService,onChange:r=>c({...n,signalService:r})}),e.jsxs("label",{className:"block space-y-2 text-sm leading-normal font-medium",children:["Fallback policy",e.jsxs("select",{value:n.fallbackPolicy,onChange:r=>c({...n,fallbackPolicy:r.target.value}),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"when-direct-unavailable",children:"When direct is unavailable"}),e.jsx("option",{value:"prefer-p2p",children:"Prefer P2P"})]})]}),e.jsx(te,{label:"Save P2P configuration",saving:s,onClick:()=>i({p2p:n})})]}):e.jsx(ae,{title:"P2P"})}function se({title:a,applyState:s,children:t}){return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:a}),e.jsx(A,{className:"leading-normal",children:"保存后重启 Xpod 生效"})]}),e.jsxs(E,{className:"space-y-4",children:[s==="restart-required"?e.jsx("div",{role:"status",className:"rounded-md border border-warning/40 bg-warning/10 px-3 py-2 text-sm leading-normal text-warning dark:bg-warning/20 dark:text-warning",children:"已保存,需要重启"}):null,t]})]})}function S({name:a,label:s,value:t,type:i="text",onChange:n}){return e.jsxs("label",{className:"block space-y-2 text-sm leading-normal font-medium",children:[s,e.jsx("input",{name:a,type:i,value:t,onChange:c=>n(c.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm leading-normal"})]})}function Se({name:a,label:s,value:t,min:i,max:n,onChange:c}){return e.jsxs("label",{className:"block space-y-2 text-sm leading-normal font-medium",children:[s,e.jsx("input",{name:a,type:"number",value:t,min:i,max:n,onChange:r=>c(r.target.valueAsNumber),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm leading-normal"})]})}function oe({label:a,checked:s,onChange:t}){return e.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-3 text-sm leading-normal font-medium",children:[a,e.jsx("input",{type:"checkbox",checked:s,onChange:i=>t(i.target.checked)})]})}function te({label:a,saving:s,onClick:t}){return e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{type:"button",onClick:t,disabled:s,children:s?"正在保存…":a})})}function Ca({endpoint:a,loading:s}){const t=[{label:"Canonical URL",value:a},{label:"API endpoint",value:a?Sa(a,"/api/"):void 0}],i=async(n,c)=>{await window.navigator.clipboard.writeText(c),H({description:`${n} copied`})};return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsxs(L,{className:"flex items-center gap-2 text-base leading-normal",children:[e.jsx(we,{className:"h-4 w-4","aria-hidden":"true"}),"接入点"]}),e.jsx(A,{className:"leading-normal",children:s?"正在解析接入点":"Observed endpoints · Currently effective route is the canonical URL"})]}),e.jsx(E,{className:"space-y-3",children:t.map(({label:n,value:c})=>e.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-md border border-border p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs leading-normal font-medium text-muted-foreground",children:n}),e.jsx("div",{className:"mt-1 break-words text-sm leading-normal text-foreground",children:c||"Unavailable"})]}),c?e.jsxs("div",{className:"flex shrink-0 gap-1",children:[e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":`Copy ${n}`,onClick:()=>{i(n,c)},children:e.jsx(le,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(y,{type:"button",size:"icon",variant:"ghost","aria-label":`Open ${n}`,onClick:()=>window.open(c,"_blank","noopener,noreferrer"),children:e.jsx(Ne,{className:"h-4 w-4","aria-hidden":"true"})})]}):null]},n))})]})}function Sa(a,s){try{return new URL(s,a).toString()}catch{return a}}function Da({sections:a,loading:s,diagnostics:t,checkedAt:i}){return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsxs(L,{className:"flex items-center gap-2 text-base leading-normal",children:[e.jsx(ca,{className:"h-4 w-4","aria-hidden":"true"}),"网络地址"]}),e.jsx(A,{className:"leading-normal",children:s?"正在刷新地址":"由运行时网络能力上报"})]}),e.jsx(E,{className:"space-y-4",children:a.map(n=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs leading-normal font-medium text-muted-foreground",children:n.title}),n.values.length>0?e.jsx("div",{className:"mt-1 space-y-1",children:n.values.map(c=>e.jsx(Ra,{scope:n.key,value:c,diagnostics:t,checkedAt:i},c))}):e.jsx("div",{className:"mt-1 text-sm leading-normal text-muted-foreground",children:"未提供"})]},n.key))})]})}function Ra({scope:a,value:s,diagnostics:t,checkedAt:i}){const n=Pa(s),c=t.find(r=>r.id==="address-configuration");return e.jsxs("div",{className:"rounded-md border border-border p-3 text-sm leading-normal",children:[e.jsx("div",{className:"break-words font-medium text-foreground",children:s}),e.jsxs("dl",{className:"mt-2 grid gap-x-4 gap-y-1 text-xs leading-normal sm:grid-cols-2",children:[e.jsx(w,{label:"Interface",value:a==="local"?"Loopback":a==="lan"?"LAN interface (name not reported)":"Public route"}),e.jsx(w,{label:"IP version",value:n.ipVersion}),e.jsx(w,{label:"Port",value:n.port}),e.jsx(w,{label:"Configured",value:c?c.status==="ok"?"Yes":"No":"Not checked"}),e.jsx(w,{label:"Reachability",value:"Not probed"}),e.jsx(w,{label:"Configuration checked",value:c?.checkedAt?U(c.checkedAt):i?i.toLocaleString():"Not checked"})]})]})}function w({label:a,value:s}){return e.jsxs("div",{className:"flex justify-between gap-3",children:[e.jsx("dt",{className:"text-muted-foreground",children:a}),e.jsx("dd",{className:"text-right text-foreground",children:s})]})}function Pa(a){try{const s=new URL(a),t=s.hostname.replace(/^\[|\]$/g,"");return{ipVersion:t.includes(":")?"IPv6":/^\d{1,3}(?:\.\d{1,3}){3}$/.test(t)?"IPv4":"Resolved hostname",port:s.port||(s.protocol==="https:"?"443":s.protocol==="http:"?"80":"Not reported")}}catch{return{ipVersion:"Not reported",port:"Not reported"}}}function Ta({status:a}){const s=a?.configuration?.domainDns,t=(a?.addresses.public??[]).map(i=>{try{return new URL(i).hostname}catch{return i}});return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:"Observed DNS"}),e.jsx(A,{className:"leading-normal",children:"Observed state is kept separate from desired DNS policy."})]}),e.jsxs(E,{className:"space-y-3",children:[e.jsx(V,{label:"Runtime status",capability:a?.dns}),e.jsxs("dl",{className:"grid gap-2 text-sm leading-normal sm:grid-cols-2",children:[e.jsx(w,{label:"Observed hostnames",value:t.join(", ")||"Not reported"}),e.jsx(w,{label:"Expected domain",value:s?.domain||"Not configured"}),e.jsx(w,{label:"Expected value",value:a?.addresses.public[0]||"Not reported"}),e.jsx(w,{label:"Provider",value:s?.provider||"Not configured"})]})]})]})}function La({status:a}){const s=a?.configuration?.https;return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsx(L,{className:"text-base leading-normal",children:"Observed HTTPS"}),e.jsx(A,{className:"leading-normal",children:"Certificate evidence reported by the active runtime."})]}),e.jsxs(E,{className:"space-y-3",children:[e.jsx(V,{label:"TLS",capability:a?.tls,extra:a?.tls.expiresAt?`Expires ${U(a.tls.expiresAt)}`:void 0}),e.jsxs("dl",{className:"grid gap-2 text-sm leading-normal sm:grid-cols-2",children:[e.jsx(w,{label:"Certificate domains",value:a?.tls.domains?.join(", ")||s?.domains.join(", ")||"Not reported"}),e.jsx(w,{label:"Issuer",value:a?.tls.issuer||"Not reported by runtime"}),e.jsx(w,{label:"Validity",value:a?.tls.validFrom?`${U(a.tls.validFrom)} — ${a.tls.expiresAt?U(a.tls.expiresAt):"open"}`:a?.tls.status??"Not reported"}),e.jsx(w,{label:"Expiry",value:a?.tls.expiresAt?U(a.tls.expiresAt):"Not reported"}),e.jsx(w,{label:"Renewal status",value:a?.tls.renewalStatus||(a?.actions.renewCertificate?"Renewal available":"Renewal unavailable")}),e.jsx(w,{label:"Renewal policy",value:s?`${s.renewBeforeDays} days before expiry`:"Not configured"})]})]})]})}function Aa({status:a}){return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsxs(L,{className:"flex items-center gap-2 text-base leading-normal",children:[e.jsx(ke,{className:"h-4 w-4","aria-hidden":"true"}),"网络能力"]}),e.jsx(A,{className:"leading-normal",children:"服务端声明的网络支持"})]}),e.jsxs(E,{className:"grid gap-3 text-sm leading-normal",children:[e.jsx(V,{label:"TLS",capability:a?.tls,extra:a?.tls.expiresAt?`到期时间 ${U(a.tls.expiresAt)}`:void 0}),e.jsx(V,{label:"DNS",capability:a?.dns}),e.jsx(V,{label:"Tunnel",capability:a?.tunnel})]})]})}function je({status:a,endpoint:s,diagnostics:t,diagnosing:i,renewing:n,onDiagnose:c,onRenewCertificate:r}){const x=t.length>0?fa({generatedAt:new Date().toISOString(),endpoint:s,checks:t}):void 0,f=async()=>{x&&(await window.navigator.clipboard.writeText(x),H({description:"Diagnostic report copied"}))},d=()=>{if(!x)return;const m=URL.createObjectURL(new Blob([x],{type:"text/plain;charset=utf-8"})),v=document.createElement("a");v.href=m,v.download=`xpod-network-diagnostics-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,v.click(),URL.revokeObjectURL(m)};return e.jsxs(P,{children:[e.jsxs(T,{children:[e.jsxs(L,{className:"flex items-center gap-2 text-base leading-normal",children:[e.jsx(ye,{className:"h-4 w-4","aria-hidden":"true"}),"操作"]}),e.jsx(A,{className:"leading-normal",children:"仅显示网络能力允许的操作"})]}),e.jsxs(E,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[a?.actions.diagnose?e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:c,disabled:i,children:[e.jsx(ra,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"连通性诊断"]}):null,a?.actions.renewCertificate?e.jsxs(y,{type:"button",size:"sm",variant:"subtle",onClick:r,disabled:n,children:[e.jsx(sa,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"续签证书"]}):null,e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:()=>{f()},disabled:!x,children:[e.jsx(le,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"复制诊断"]}),e.jsxs(y,{type:"button",size:"sm",variant:"outline",onClick:d,disabled:!x,children:[e.jsx(Ke,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"导出诊断"]})]}),t.length>0?e.jsx("div",{className:"space-y-2",children:t.map(m=>e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm leading-normal font-medium text-foreground",children:m.label}),e.jsx(q,{variant:m.status==="ok"?"secondary":"outline",children:m.status})]}),m.detail?e.jsx("div",{className:"mt-1 break-words text-xs leading-normal text-muted-foreground",children:m.detail}):null]},m.id))}):e.jsx("div",{className:"text-sm leading-normal text-muted-foreground",children:"尚未运行过诊断。"})]})]})}function V({label:a,capability:s,extra:t}){const i=s?.supported===!0;return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm leading-normal font-medium text-foreground",children:i?a:`${a} 不支持`}),e.jsxs("div",{className:"text-xs leading-normal text-muted-foreground",children:[s?.status??"读取中",s?.detail?` · ${s.detail}`:""]})]}),e.jsx(q,{variant:i?"secondary":"outline",children:i?"支持":"不支持"})]}),t?e.jsx("div",{className:"mt-2 text-xs leading-normal text-muted-foreground",children:t}):null]})}function U(a){if(!a)return"暂无记录";const s=new Date(a);return Number.isNaN(s.getTime())?"暂无记录":s.toLocaleString()}function Ka(){return e.jsx(va,{embedded:!0})}const De=[["gateway","入口网关"],["css","Solid 服务"],["api","API 服务"],["qlever","查询引擎(QLever)"],["inngest","任务调度(Inngest)"]],Ea={running:"运行中",stopped:"已停止",starting:"启动中",crashed:"运行异常",failed:"运行异常"};function Wa(){const[a,s]=o.useState(),[t,i]=o.useState([]),[n,c]=o.useState(),[r,x]=o.useState(!1),[f,d]=o.useState(""),m=o.useCallback(async()=>{x(!0),d("");try{const[h,N,u]=await Promise.all([Ie(),Ce({fetchImpl:fetch}).catch(()=>{}),globalThis.xpodDesktop?.deviceRuntime?.getRuntimeSettings?.()]);s(h),i(N?.clients??[]),c(u),!h.adminData&&!u&&d("暂时无法读取设备状态,请重试。")}catch{d("暂时无法读取设备状态,请重试。")}finally{x(!1)}},[]);o.useEffect(()=>{let h=!0;return queueMicrotask(()=>{h&&m()}),()=>{h=!1}},[m]);const v=async h=>{if(!(h!=="start"&&!window.confirm(`${h==="stop"?"停止":"重启"}这台设备上的 Xpod?正在进行的请求会中断。`))){x(!0),d("");try{if(globalThis.xpodDesktop?.deviceRuntime?.runtimeAction)await globalThis.xpodDesktop.deviceRuntime.runtimeAction(h);else if(h!=="restart"||!await Oe())throw new Error;await m()}catch{d("操作未完成,请重试。")}finally{x(!1)}}},b=Array.from(new Map(t.map(h=>[h.binary,h])).values()),$=n?.state==="stopped"||n?.state==="failed";return e.jsxs("section",{className:"space-y-6 p-6",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[$?e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",disabled:r,onClick:()=>{v("start")},children:"启动 Xpod"}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"outline",disabled:r,onClick:()=>{v("restart")},children:"重启 Xpod"}),e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"outline",disabled:r||n?.ownership!=="desktop",onClick:()=>{v("stop")},children:"停止 Xpod"})]}),e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"ghost",disabled:r,onClick:m,children:"刷新"})]}),f&&e.jsx("p",{role:"alert",className:"text-sm leading-normal text-destructive",children:f}),e.jsxs("section",{children:[e.jsx(xe,{level:2,title:"核心服务",className:"mb-2",titleClassName:"text-muted-foreground"}),e.jsx(ee,{children:De.map(([h,N])=>{const u=a?.servicesData?.find(l=>l.name===h)?.status??(h==="gateway"&&a?.adminData?"running":void 0);return e.jsx(ie,{title:N,trailing:e.jsx("span",{className:u==="running"?"text-success":"text-muted-foreground",children:u?Ea[u]:"未报告"})},h)})})]}),e.jsxs("section",{children:[e.jsx(xe,{level:2,title:"可选组件",className:"mb-2",titleClassName:"text-muted-foreground"}),e.jsxs(ee,{children:[b.map(h=>e.jsx(ie,{title:h.binary,trailing:e.jsx("span",{children:h.state==="missing"?"未安装":a?.servicesData?.some(N=>N.name===h.binary&&N.status==="running")?"运行中":"未使用"}),children:h.state==="missing"&&e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-primary",children:"安装方法"}),e.jsx("p",{className:"mt-2 break-words text-xs leading-normal text-muted-foreground",children:h.installHint})]})},h.binary)),!b.length&&e.jsx("p",{className:"p-4 text-sm leading-normal text-muted-foreground",children:"暂未读取到可选组件状态"})]})]}),e.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:"停止只影响这台设备;Xpod 云端和其他设备上的 Pod 不受影响。"})]})}function Ga(){const[a,s]=o.useState(),[t,i]=o.useState(""),[n,c]=o.useState(""),[r,x]=o.useState(""),[f,d]=o.useState("");o.useEffect(()=>{Promise.all([globalThis.xpodDesktop?.deviceRuntime?.getRuntimeSettings?.(),Me()]).then(([v,b])=>{s(v),i(v?.dataDirectory??b?.env.CSS_ROOT_FILE_PATH??""),c(b?.env.XPOD_EDITION??"")}).catch(()=>x("无法读取运行设置,请重试。"))},[]);const m=async()=>{x("");try{const v=await globalThis.xpodDesktop?.deviceRuntime?.selectDataDirectory?.();if(!v)return;if(!await _e({CSS_ROOT_FILE_PATH:v}))throw new Error;i(v),d("已保存,重启后使用新位置;原有数据不会自动迁移。")}catch{x("无法更改数据位置,请重试。")}};return e.jsxs("section",{className:"space-y-5 p-6 text-sm leading-normal",children:[r&&e.jsx("p",{role:"alert",className:"text-destructive",children:r}),f&&e.jsx("p",{role:"status",children:f}),e.jsx(he,{label:"开机时启动 Xpod",checked:a?.launchAtLogin??!1,disabled:!a||!globalThis.xpodDesktop?.deviceRuntime?.setLaunchAtLogin,onCheckedChange:async v=>{try{await globalThis.xpodDesktop?.deviceRuntime?.setLaunchAtLogin?.(v),s(b=>b&&{...b,launchAtLogin:v})}catch{x("无法保存开机启动设置。")}}}),e.jsx(he,{label:"意外退出时自动重启",description:"你手动停止的不会被重启",checked:a?.autoRestart??!1,disabled:!a||!globalThis.xpodDesktop?.deviceRuntime?.setAutoRestart,onCheckedChange:async v=>{try{await globalThis.xpodDesktop?.deviceRuntime?.setAutoRestart(v),s(b=>b&&{...b,autoRestart:v})}catch{x("无法保存自动重启设置。")}}}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:"数据位置"}),e.jsx("p",{className:"break-all text-muted-foreground",children:t||"未报告"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"outline",disabled:!globalThis.xpodDesktop?.deviceRuntime?.showDataDirectory,onClick:()=>{globalThis.xpodDesktop?.deviceRuntime?.showDataDirectory?.().catch(()=>x("无法打开数据位置。"))},children:["在",globalThis.xpodDesktop?.platform==="darwin"?"访达":"文件管理器","中显示"]}),e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"outline",disabled:!globalThis.xpodDesktop?.deviceRuntime?.selectDataDirectory,onClick:()=>{m()},children:"更改"})]})]}),e.jsxs("div",{className:"flex justify-between border-t border-border pt-4",children:[e.jsx("span",{children:"运行方式"}),e.jsx("span",{children:n==="cloud"?"Xpod 云端":n==="local"?"这台设备":n==="standalone"?"Xpod 独立运行":"未报告"})]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"开发者模式"}),e.jsxs("dl",{className:"mt-3 space-y-2",children:[e.jsxs("div",{children:["访问地址:",window.location.origin]}),e.jsxs("div",{children:["端口:",window.location.port||(window.location.protocol==="https:"?"443":"80")]})]})]})]})}function Ja(){const[a,s]=o.useState([]),[t,i]=o.useState(()=>new URLSearchParams(window.location.search).get("source")??"all"),[n,c]=o.useState("all"),[r,x]=o.useState("all"),[f,d]=o.useState(()=>Date.now()),[m,v]=o.useState(""),[b,$]=o.useState(!1),h=o.useCallback(async()=>{$(!0);try{s(await $e({source:t,level:n,limit:500})),d(Date.now())}finally{$(!1)}},[t,n]);o.useEffect(()=>{let u=!0;return queueMicrotask(()=>{u&&h()}),()=>{u=!1}},[h]);const N=a.filter(u=>(r==="all"||new Date(u.timestamp).getTime()>=f-Number(r))&&`${u.source} ${u.message}`.toLowerCase().includes(m.toLowerCase()));return e.jsxs("section",{className:"space-y-4 p-6",children:[e.jsxs("div",{className:"flex flex-wrap gap-3 text-sm leading-normal",children:[e.jsxs("label",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-2 sm:w-auto",children:["来源",e.jsxs(ne,{value:t,onChange:u=>i(u.target.value),children:[e.jsx("option",{value:"all",children:"全部来源"}),De.map(([u,l])=>e.jsx("option",{value:u,children:l},u))]})]}),e.jsxs("label",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-2 sm:w-auto",children:["级别",e.jsxs(ne,{value:n,onChange:u=>c(u.target.value),children:[e.jsx("option",{value:"all",children:"全部级别"}),e.jsx("option",{value:"error",children:"错误"}),e.jsx("option",{value:"warn",children:"警告"}),e.jsx("option",{value:"info",children:"信息"}),e.jsx("option",{value:"debug",children:"调试"})]})]}),e.jsxs("label",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-2 sm:w-auto",children:["时间",e.jsxs(ne,{value:r,onChange:u=>x(u.target.value),children:[e.jsx("option",{value:"all",children:"全部时间"}),e.jsx("option",{value:"3600000",children:"最近一小时"}),e.jsx("option",{value:"86400000",children:"最近一天"}),e.jsx("option",{value:"604800000",children:"最近七天"})]})]}),e.jsx(Ue,{"aria-label":"搜索日志",value:m,onChange:u=>v(u.target.value),placeholder:"搜索日志"}),e.jsx(y,{className:"h-auto min-h-9 py-1 leading-normal",variant:"outline",disabled:b,onClick:h,children:"刷新"})]}),e.jsxs(ee,{children:[N.map((u,l)=>e.jsxs("div",{className:"p-3 text-xs leading-normal",children:[e.jsxs("div",{className:"text-muted-foreground",children:[new Date(u.timestamp).toLocaleString()," · ",u.source," · ",u.level]}),e.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words font-mono leading-normal",children:u.message})]},`${u.timestamp}-${l}`)),!N.length&&e.jsx("p",{className:"p-4 text-sm leading-normal text-muted-foreground",children:b?"正在读取日志…":"没有匹配的日志"})]}),e.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:"显示最近 500 条日志中的匹配结果"})]})}export{Ja as DeviceLogsPage,Ka as DeviceNetworkPage,Ga as DeviceRuntimePage,Wa as DeviceServicesPage};